// 先初始化 npm init

// 加载模块
let express = require('express');

let app = express();

app.get('/a', (req, res) => {//添加get接口
    console.log('请求的路径为：/a');

    let { user, pass } = req.query;

    console.log(user, pass);
    
    res.set('Content-type', "text/plain;charset=utf-8");

    // 设置响应请求
    res.end({a:123 , b:456});
    
}); 
app.listen(30001, () => {
    console.log("----------服务启动成功--------------");
});